﻿using System;

namespace ConsoleApp2
{
    class Program
    {
        //已知person类下包含教师和学生两个子类，请使用接口实现收作业功能；
    interface Ihomework
        {
            public void finishwork()
            {
                Console.WriteLine("finish homework！！！");
            }
        }
        //老师类
        class teacher : Ihomework
        {
            public void finishwork()
            {
                Console.WriteLine("同学们，收作业啦！！！");
            }
        }
        //学生类
        class student : Ihomework
        {
            public void finishwork()
            {
                Console.WriteLine("老师，作业收齐啦！！！");
            }
        }
        static void Main(string[] args)
        {
            teacher th = new teacher();
            th.finishwork();
            student st = new student();
            st.finishwork();
            //Console.WriteLine("Hello World!");
        }
    }
}
